﻿<phone:PhoneApplicationPage 
    x:Class="MapABCAPI_WP7.Samples.AddLayer"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
     xmlns:Mapabc="clr-namespace:Com.Mapabc.Maps.Api;assembly=Mapabc.WP7.API"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <!--Pivot Control-->
        <controls:Pivot x:Name="Pivot" Title="{StaticResource ApplicationTitle}">
            <!--Pivot item one-->
            <controls:PivotItem Header="功能">
                <Grid Height="653" Name="grid1" Width="457">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="65" />
                        <ColumnDefinition Width="417" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"  />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Image Style="{StaticResource ImageMainStyle}" Grid.Row="0"></Image>
                    <HyperlinkButton Style="{StaticResource HyperlinkEmptyStyle}" Grid.Column="1" Grid.Row="0">
                        <TextBlock  Style="{StaticResource TextBlockMainStyle}" Text="叠加/删除切片图层"  Tap="TileLayer"/>
                    </HyperlinkButton>
                </Grid>
            </controls:PivotItem>

            <!--Pivot item two-->
            <controls:PivotItem Header="地图示例">
                <Grid>
                    <Mapabc:MMap x:Name="map" Zoom="10"/>
                    <Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="5" x:Name="cont">
                        <Border Background="LightGray" BorderBrush="DarkGray" CornerRadius="10" BorderThickness="3" Height="333" Margin="-246,0,7,-287" Width="285">
                            <StackPanel Orientation="Vertical" Margin="20">
                                <StackPanel.Resources>
                                    <Style x:Name="spTextBlockStyle" TargetType="TextBlock">
                                        <Setter Property="FontWeight" Value="Bold"/>
                                        <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeNormal}" />
                                        <Setter Property="Foreground" Value="Black" />
                                        <Setter Property="MinWidth" Value="150" />
                                    </Style>
                                </StackPanel.Resources>
                                <!--<Button Content="打开信息窗体" Height="73" Name="button1" Width="176" Click="openMapTip" Visibility="Collapsed"/>
                                <Button Content="关闭信息窗体" Height="73" Name="button2" Width="176" Click="closeMapTip" Visibility="Collapsed"/>-->
                                <!--<Button Content="打开信息窗体" Height="81" Name="button3" Width="201"  Click="openMapTip"/>
                                <Button Content="关闭信息窗体" Height="79" Name="button4" Width="204" Click="closeMapTip"/>-->
                                <Button Content="叠加实时交通" Height="72" Name="button1" Width="200" Click="AddTileLayer"  />
                                <Button Content="删除实时交通" Height="72" Name="button2" Width="200" Click="RemoveTileLayer" />
                                <Button Content="叠加轨道交通" Height="72" Name="button3" Width="200" Click="AddTansitLayer" />
                                <Button Content="删除轨道交通" Height="72" Name="button4" Width="200" Click="RemoveTansitLayer" />
                            </StackPanel>
                        </Border>
                    </Grid>
                </Grid>
            </controls:PivotItem>
        </controls:Pivot>
    </Grid>


</phone:PhoneApplicationPage>